
function generBgImage() {
  // 选择图片
  // 裁剪图片

  const ctx = new DrawContext()

  ctx.size = new Size(100,100)

  ctx.draw

}

function cropImage(image) {
   
  let draw = new DrawContext()
  let rect = new Rect(crop.x,crop.y,crop.w,crop.h)
  draw.size = new Size(rect.width, rect.height)
  
  draw.drawImageAtPoint(image,new Point(-rect.x, -rect.y))  
  return draw.getImage()
}

function saveImage(image) {
  const fm = FileManager.local()
  fm.writeImage()
}

// 运行APP
if (config.runsInApp) {

}